	<div id="sidebar">
	
	<div id="subscribe">
	<a class="rss" href="<?php $blogofolio_feed_url = get_option('blogofolio_feed_url'); echo stripslashes($blogofolio_feed_url); ?>" title=""><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.png" alt="RSS Feed" /></a>
	<a class="rssemail" rel="modal" href="#" title=""><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rssemail.png" alt="RSS via Email" /></a>
	<a class="facebook" href="<?php $blogofolio_facebook_link = get_option('blogofolio_facebook_link'); echo stripslashes($blogofolio_facebook_link); ?>" title=""><img src="<?php bloginfo('stylesheet_directory'); ?>/images/facebook.png" alt="Facebook Updates" /></a>
	<a class="delicious" href="http://www.delicious.com/post?url=<?php echo get_option('home'); ?>/&amp;title=<?php bloginfo('name'); ?>" title=""><img src="<?php bloginfo('stylesheet_directory'); ?>/images/delicious.png" alt="Bookmark" /></a>
	</div>
	
	<?php $blogofolio_ad_check = get_option('blogofolio_ad_check'); if($blogofolio_ad_check): ?>
	<div class="thumbs">
	<?php $blogofolio_ad1_check = get_option('blogofolio_ad1_check'); if($blogofolio_ad1_check): ?>
		 <a href="<?php $blogofolio_ad1_link = get_option('blogofolio_ad1_link'); echo stripslashes($blogofolio_ad1_link); ?>" target="_blank"><img src="<?php $blogofolio_ad1 = get_option('blogofolio_ad1'); echo stripslashes($blogofolio_ad1); ?>" alt="" /></a>
    <?php endif; ?>
	<?php $blogofolio_ad2_check = get_option('blogofolio_ad2_check'); if($blogofolio_ad2_check): ?>
		 <a href="<?php $blogofolio_ad2_link = get_option('blogofolio_ad2_link'); echo stripslashes($blogofolio_ad2_link); ?>" target="_blank"><img src="<?php $blogofolio_ad2 = get_option('blogofolio_ad2'); echo stripslashes($blogofolio_ad2); ?>" alt="" /></a>
	<?php endif; ?>
	<?php $blogofolio_ad3_check = get_option('blogofolio_ad3_check'); if($blogofolio_ad3_check): ?>
         <a href="<?php $blogofolio_ad3_link = get_option('blogofolio_ad3_link'); echo stripslashes($blogofolio_ad3_link); ?>" target="_blank"><img src="<?php $blogofolio_ad3 = get_option('blogofolio_ad3'); echo stripslashes($blogofolio_ad3); ?>" alt="" /></a>
	<?php endif; ?>	 
	<?php $blogofolio_ad4_check = get_option('blogofolio_ad4_check'); if($blogofolio_ad4_check): ?>
         <a href="<?php $blogofolio_ad4_link = get_option('blogofolio_ad4_link'); echo stripslashes($blogofolio_ad4_link); ?>" target="_blank"><img src="<?php $blogofolio_ad4 = get_option('blogofolio_ad4'); echo stripslashes($blogofolio_ad4); ?>" alt="" /></a>
	<?php endif; ?>	 
	<?php $blogofolio_ad5_check = get_option('blogofolio_ad5_check'); if($blogofolio_ad5_check): ?>
         <a href="<?php $blogofolio_ad5_link = get_option('blogofolio_ad5_link'); echo stripslashes($blogofolio_ad5_link); ?>" target="_blank"><img src="<?php $blogofolio_ad5 = get_option('blogofolio_ad5'); echo stripslashes($blogofolio_ad5); ?>" alt="" /></a>
	<?php endif; ?>	 
	<?php $blogofolio_ad6_check = get_option('blogofolio_ad6_check'); if($blogofolio_ad6_check): ?>
         <a href="<?php $blogofolio_ad6_link = get_option('blogofolio_ad6_link'); echo stripslashes($blogofolio_ad6_link); ?>" target="_blank"><img src="<?php $blogofolio_ad6 = get_option('blogofolio_ad6'); echo stripslashes($blogofolio_ad6); ?>" alt="" /></a>
	<?php endif; ?>
	</div>
	<div class="clear">&nbsp;</div>
	<?php endif; ?>
	
		<ul>
			<?php 	/* Widgetized sidebar, if you have the plugin installed. */
					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
					
			<li>
				<?php include (TEMPLATEPATH . '/searchform.php'); ?>
			</li>

			<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?>

			<li><h2>Archives</h2>
				<ul>
				<?php wp_get_archives('type=monthly'); ?>
				</ul>
			</li>

			<?php wp_list_categories('show_count=0&title_li=<h2>Categories</h2>'); ?>

			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
				<?php wp_list_bookmarks(); ?>

				<li><h2>Meta</h2>
				<ul>
					<?php wp_register(); ?>
					<li><?php wp_loginout(); ?></li>
					<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
					<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
					<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
					<?php wp_meta(); ?>
				</ul>
				</li>
				
			<?php } ?>

			<?php endif; ?>
		</ul>
		
	</div>